'\" t
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "ARCHINSTALL" "1" "Nov 23, 2024" "" "python-archinstall"
.SH NAME
archinstall \- archinstall Documentation
.sp
\fBarchinstall\fP is library which can be used to install Arch Linux.
The library comes packaged with different pre\-configured installers, such as the default \fI\%Guided installation\fP installer.
.sp
A demo of the \fI\%Guided installation\fP installer can be seen here: \X'tty: link https://www.youtube.com/watch?v=9Xt7X_Iqg6E'\fI\%https://www.youtube.com/watch?v=9Xt7X_Iqg6E\fP\X'tty: link'\&.
.sp
Some of the features of Archinstall are:
.INDENT 0.0
.IP \(bu 2
\fBContext friendly.\fP The library always executes calls in sequential order to ensure installation\-steps don\(aqt overlap or execute in the wrong order. It also supports \fI(and uses)\fP context wrappers to ensure cleanup and final tasks such as \fBmkinitcpio\fP are called when needed.
.IP \(bu 2
\fBFull transparency\fP Logs and insights can be found at \fB/var/log/archinstall\fP both in the live ISO and partially on the installed system.
.IP \(bu 2
\fBAccessibility friendly\fP Archinstall works with \fBespeakup\fP and other accessibility tools thanks to the use of a TUI.
.UNINDENT
.SH GUIDED INSTALLATION
.sp
Archinstall ships with a pre\-programmed \X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py'\fI\%Guided Installer\fP\X'tty: link' guiding you through the mandatory steps as well as some optional configurations that can be done.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Other pre\-programmed scripts can be invoked by executing \fBarchinstall <script>\fP \fI(without .py)\fP\&. To see a complete list of scripts, run \fBarchinstall \-\-script list\fP or check the source code \X'tty: link https://github.com/archlinux/archinstall/tree/master/archinstall/scripts'\fI\%scripts\fP\X'tty: link' directory.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
It\(aqs recommended to run \fBarchinstall\fP from the official Arch Linux ISO.
.UNINDENT
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
The installer will not configure WiFi before the installation begins. You need to read up on \X'tty: link https://wiki.archlinux.org/index.php/Network_configuration'\fI\%Arch Linux networking\fP\X'tty: link' before you continue.
.UNINDENT
.UNINDENT
.SS Running the guided installation
.sp
To start the installer, run the following in the latest Arch Linux ISO:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
archinstall
.EE
.UNINDENT
.UNINDENT
.sp
Since the \X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py'\fI\%Guided Installer\fP\X'tty: link' is the default script, this is the equivalent of running \fBarchinstall guided\fP
.sp
The guided installation also supports installing with pre\-configured answers to all the guided steps. This can be a quick and convenient way to re\-run one or several installations.
.sp
There are two configuration files, both are optional.
.SS \fB\-\-config\fP
.sp
This parameter takes a local or remote \fB\&.json\fP file as argument and contains the overall configuration and menu answers for the guided installer.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
You can always get the latest options for this file with \fBarchinstall \-\-dry\-run\fP, this executes the guided installer in a safe mode where no permanent actions will be taken on your system but simulate a run and save the configuration to disk.
.UNINDENT
.UNINDENT
.SS Example usage
.INDENT 0.0
.INDENT 3.5
.sp
.EX
archinstall \-\-config https://domain.lan/config.json
.EE
.UNINDENT
.UNINDENT
.sp
The contents of \fBhttps://domain.lan/config.json\fP:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
{
    \(dq__separator__\(dq: null,
    \(dqadditional\-repositories\(dq: [],
    \(dqarchinstall\-language\(dq: \(dqEnglish\(dq,
    \(dqaudio_config\(dq: null,
    \(dqbootloader\(dq: \(dqSystemd\-boot\(dq,
    \(dqconfig_version\(dq: \(dq2.6.0\(dq,
    \(dqdebug\(dq: false,
    \(dqdisk_config\(dq: {
        \(dqconfig_type\(dq: \(dqmanual_partitioning\(dq,
        \(dqdevice_modifications\(dq: [
            {
                \(dqdevice\(dq: \(dq/dev/sda\(dq,
                \(dqpartitions\(dq: [
                    {
                        \(dqbtrfs\(dq: [],
                        \(dqflags\(dq: [
                            \(dqboot\(dq
                        ],
                        \(dqfs_type\(dq: \(dqfat32\(dq,
                        \(dqlength\(dq: {
                            \(dqsector_size\(dq: null,
                            \(dqtotal_size\(dq: null,
                            \(dqunit\(dq: \(dqB\(dq,
                            \(dqvalue\(dq: 99982592
                        },
                        \(dqmount_options\(dq: [],
                        \(dqmountpoint\(dq: \(dq/boot\(dq,
                        \(dqobj_id\(dq: \(dq369f31a8\-2781\-4d6b\-96e7\-75680552b7c9\(dq,
                        \(dqstart\(dq: {
                            \(dqsector_size\(dq: {
                                \(dqsector_size\(dq: null,
                                \(dqtotal_size\(dq: null,
                                \(dqunit\(dq: \(dqB\(dq,
                                \(dqvalue\(dq: 512
                            },
                            \(dqtotal_size\(dq: null,
                            \(dqunit\(dq: \(dqsectors\(dq,
                            \(dqvalue\(dq: 34
                        },
                        \(dqstatus\(dq: \(dqcreate\(dq,
                        \(dqtype\(dq: \(dqprimary\(dq
                    },
                    {
                        \(dqbtrfs\(dq: [],
                        \(dqflags\(dq: [],
                        \(dqfs_type\(dq: \(dqfat32\(dq,
                        \(dqlength\(dq: {
                            \(dqsector_size\(dq: null,
                            \(dqtotal_size\(dq: null,
                            \(dqunit\(dq: \(dqB\(dq,
                            \(dqvalue\(dq: 100000000
                        },
                        \(dqmount_options\(dq: [],
                        \(dqmountpoint\(dq: \(dq/efi\(dq,
                        \(dqobj_id\(dq: \(dq13cf2c96\-8b0f\-4ade\-abaa\-c530be589aad\(dq,
                        \(dqstart\(dq: {
                            \(dqsector_size\(dq: {
                                \(dqsector_size\(dq: null,
                                \(dqtotal_size\(dq: null,
                                \(dqunit\(dq: \(dqB\(dq,
                                \(dqvalue\(dq: 512
                            },
                            \(dqtotal_size\(dq: {
                                \(dqsector_size\(dq: null,
                                \(dqtotal_size\(dq: null,
                                \(dqunit\(dq: \(dqB\(dq,
                                \(dqvalue\(dq: 16106127360
                            },
                            \(dqunit\(dq: \(dqMB\(dq,
                            \(dqvalue\(dq: 100
                        },
                        \(dqstatus\(dq: \(dqcreate\(dq,
                        \(dqtype\(dq: \(dqprimary\(dq
                    },
                    {
                        \(dqbtrfs\(dq: [],
                        \(dqflags\(dq: [],
                        \(dqfs_type\(dq: \(dqext4\(dq,
                        \(dqlength\(dq: {
                            \(dqsector_size\(dq: null,
                            \(dqtotal_size\(dq: null,
                            \(dqunit\(dq: \(dqB\(dq,
                            \(dqvalue\(dq: 15805127360
                        },
                        \(dqmount_options\(dq: [],
                        \(dqmountpoint\(dq: \(dq/\(dq,
                        \(dqobj_id\(dq: \(dq3e75d045\-21a4\-429d\-897e\-8ec19a006e8b\(dq,
                        \(dqstart\(dq: {
                            \(dqsector_size\(dq: {
                                \(dqsector_size\(dq: null,
                                \(dqtotal_size\(dq: null,
                                \(dqunit\(dq: \(dqB\(dq,
                                \(dqvalue\(dq: 512
                            },
                            \(dqtotal_size\(dq: {
                                \(dqsector_size\(dq: null,
                                \(dqtotal_size\(dq: null,
                                \(dqunit\(dq: \(dqB\(dq,
                                \(dqvalue\(dq: 16106127360
                            },
                            \(dqunit\(dq: \(dqMB\(dq,
                            \(dqvalue\(dq: 301
                        },
                        \(dqstatus\(dq: \(dqcreate\(dq,
                        \(dqtype\(dq: \(dqprimary\(dq
                    }
                ],
                \(dqwipe\(dq: false
            }
        ]
    },
    \(dqdisk_encryption\(dq: {
        \(dqencryption_type\(dq: \(dqluks\(dq,
        \(dqpartitions\(dq: [
            \(dq3e75d045\-21a4\-429d\-897e\-8ec19a006e8b\(dq
        ]
    },
    \(dqhostname\(dq: \(dqarchlinux\(dq,
    \(dqkernels\(dq: [
        \(dqlinux\(dq
    ],
    \(dqlocale_config\(dq: {
        \(dqkb_layout\(dq: \(dqus\(dq,
        \(dqsys_enc\(dq: \(dqUTF\-8\(dq,
        \(dqsys_lang\(dq: \(dqen_US\(dq
    },
    \(dqmirror_config\(dq: {
        \(dqcustom_mirrors\(dq: [],
        \(dqmirror_regions\(dq: {
            \(dqSweden\(dq: [
                \(dqhttps://mirror.osbeck.com/archlinux/$repo/os/$arch\(dq,
                \(dqhttps://mirror.bahnhof.net/pub/archlinux/$repo/os/$arch\(dq,
                \(dqhttps://ftp.myrveln.se/pub/linux/archlinux/$repo/os/$arch\(dq,
                \(dqhttps://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch\(dq,
                \(dqhttps://ftp.ludd.ltu.se/mirrors/archlinux/$repo/os/$arch\(dq,
                \(dqhttps://ftp.acc.umu.se/mirror/archlinux/$repo/os/$arch\(dq,
                \(dqhttp://mirror.bahnhof.net/pub/archlinux/$repo/os/$arch\(dq,
                \(dqhttp://ftpmirror.infania.net/mirror/archlinux/$repo/os/$arch\(dq,
                \(dqhttp://ftp.myrveln.se/pub/linux/archlinux/$repo/os/$arch\(dq,
                \(dqhttp://ftp.lysator.liu.se/pub/archlinux/$repo/os/$arch\(dq,
                \(dqhttp://ftp.acc.umu.se/mirror/archlinux/$repo/os/$arch\(dq
            ]
        }
    },
    \(dqnetwork_config\(dq: {},
    \(dqno_pkg_lookups\(dq: false,
    \(dqntp\(dq: true,
    \(dqoffline\(dq: false,
    \(dqpackages\(dq: [],
    \(dqparallel downloads\(dq: 0,
    \(dqprofile_config\(dq: null,
    \(dqsave_config\(dq: null,
    \(dqscript\(dq: \(dqguided\(dq,
    \(dqsilent\(dq: false,
    \(dqswap\(dq: true,
    \(dqtimezone\(dq: \(dqUTC\(dq,
    \(dqversion\(dq: \(dq2.6.0\(dq
}
.EE
.UNINDENT
.UNINDENT
.SS \fB\-\-config\fP options
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
All key and value entries must conform to the JSON standard. Below is human readable examples with links, effectively breaking the syntax. Adapt the descriptions below to suit your needs and the JSON format.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Scroll to the right in the table to see required options.
.UNINDENT
.UNINDENT
.SS JSON options
.TS
box center;
l|l|l|l.
T{
Key
T}	T{
Value(s)
T}	T{
Description
T}	T{
Required
T}
_
T{
additional\-repositories
T}	T{
[ \X'tty: link https://wiki.archlinux.org/title/Official_repositories#multilib'\fI\%multilib\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/Official_repositories#Testing_repositories'\fI\%testing\fP\X'tty: link' ]
T}	T{
Enables one or more of the testing and multilib repositories before proceeding with installation
T}	T{
No
T}
_
T{
archinstall\-language
T}	T{
\X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/locales/languages.json'\fI\%lang\fP\X'tty: link'
T}	T{
Sets the TUI language used \fI(make sure to use the \(ga\(galang\(ga\(ga value not the \(ga\(gaabbr\(ga\(ga)\fP
T}	T{
No
T}
_
T{
audio_config
T}	T{
\X'tty: link https://wiki.archlinux.org/title/PipeWire'\fI\%pipewire\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/PulseAudio'\fI\%pulseaudio\fP\X'tty: link'
T}	T{
Audioserver to be installed
T}	T{
No
T}
_
T{
bootloader
T}	T{
\X'tty: link https://wiki.archlinux.org/title/Systemd-boot'\fI\%Systemd\-boot\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/GRUB'\fI\%grub\fP\X'tty: link'
T}	T{
Bootloader to be installed \fI(grub being mandatory on BIOS machines)\fP
T}	T{
Yes
T}
_
T{
debug
T}	T{
\fBtrue\fP, \fBfalse\fP
T}	T{
Enables debug output
T}	T{
No
T}
_
T{
disk_config
T}	T{
\fIRead more under\fP \fI\%Disk Configuration\fP
T}	T{
Contains the desired disk setup to be used during installation
T}	T{
No
T}
_
T{
disk_encryption
T}	T{
\fIRead more about under\fP \fI\%Disk Encryption\fP
T}	T{
Parameters for disk encryption applied on top of \fBdisk_config\fP
T}	T{
No
T}
_
T{
hostname
T}	T{
\fBstr\fP
T}	T{
A string defining your machines hostname on the network \fI(defaults to \(ga\(gaarchinstall\(ga\(ga)\fP
T}	T{
No
T}
_
T{
kernels
T}	T{
[ \X'tty: link https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels'\fI\%linux\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels'\fI\%linux\-hardened\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels'\fI\%linux\-lts\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels'\fI\%linux\-rt\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels'\fI\%linux\-rt\-lts\fP\X'tty: link', \X'tty: link https://wiki.archlinux.org/title/Kernel#Officially_supported_kernels'\fI\%linux\-zen\fP\X'tty: link' ]
T}	T{
Defines which kernels should be installed and setup in the boot loader options
T}	T{
Yes
T}
_
T{
custom\-commands
T}	T{
\fIRead more under\fP \fI\%Custom Commands\fP
T}	T{
Custom commands that will be run post\-install chrooted inside the installed system
T}	T{
No
T}
_
T{
locale_config
T}	T{
{kb_layout: \X'tty: link https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration'\fI\%lang\fP\X'tty: link', sys_enc: \X'tty: link https://wiki.archlinux.org/title/Locale'\fI\%Character encoding\fP\X'tty: link', sys_lang: \X'tty: link https://wiki.archlinux.org/title/Locale'\fI\%locale\fP\X'tty: link'}
T}	T{
Defines the keyboard key map, system encoding and system locale
T}	T{
No
T}
_
T{
mirror_config
T}	T{
{custom_mirrors: [ \X'tty: link https://'\fI\%https://\fP\X'tty: link'\&... ], mirror_regions: { \(dqWorldwide\(dq: [ \(dq\X'tty: link https://geo.mirror.pkgbuild.com/$repo/os/$arch'\fI\%https://geo.mirror.pkgbuild.com/$repo/os/$arch\fP\X'tty: link'\(dq ] } }
T}	T{
Sets various mirrors \fI(defaults to ISO\(aqs \(ga\(ga/etc/pacman.d/mirrors\(ga\(ga if not defined)\fP
T}	T{
No
T}
_
T{
network_config
T}	T{
\fI\(gasee options under Network Configuration\(ga\fP
T}	T{
Sets which type of \fI(if any)\fP network configuration should be used
T}	T{
No
T}
_
T{
no_pkg_lookups
T}	T{
\fBtrue\fP, \fBfalse\fP
T}	T{
Disabled package checking against \X'tty: link https://archlinux.org/packages/'\fI\%https://archlinux.org/packages/\fP\X'tty: link'
T}	T{
No
T}
_
T{
ntp
T}	T{
\fBtrue\fP, \fBfalse\fP
T}	T{
enables or disables \X'tty: link https://wiki.archlinux.org/title/Network_Time_Protocol_daemon'\fI\%NTP\fP\X'tty: link' during installation
T}	T{
No
T}
_
T{
offline
T}	T{
\fBtrue\fP, \fBfalse\fP
T}	T{
enables or disables certain online checks such as mirror reachability etc
T}	T{
No
T}
_
T{
packages
T}	T{
[ <package1>, <package2>, ... ]
T}	T{
A list of packages to install during installation
T}	T{
No
T}
_
T{
parallel downloads
T}	T{
0\-∞
T}	T{
sets a given number of parallel downloads to be used by \X'tty: link https://wiki.archlinux.org/title/Pacman#Enabling_parallel_downloads'\fI\%pacman\fP\X'tty: link'
T}	T{
No
T}
_
T{
profile_config
T}	T{
\fI\(garead more under the profiles section\(ga\fP
T}	T{
Installs a given profile if defined
T}	T{
No
T}
_
T{
script
T}	T{
\X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/guided.py'\fI\%guided\fP\X'tty: link' \fI(default)\fP, \X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/minimal.py'\fI\%minimal\fP\X'tty: link', \X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/only_hdd.py'\fI\%only_hdd\fP\X'tty: link', \X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/swiss.py'\fI\%swiss\fP\X'tty: link', \X'tty: link https://github.com/archlinux/archinstall/blob/master/archinstall/scripts/unattended.py'\fI\%unattended\fP\X'tty: link'
T}	T{
When used to autorun an installation, this sets which script to autorun with
T}	T{
No
T}
_
T{
silent
T}	T{
\fBtrue\fP, \fBfalse\fP
T}	T{
disables or enables user questions using the TUI
T}	T{
No
T}
_
T{
swap
T}	T{
\fBtrue\fP, \fBfalse\fP
T}	T{
enables or disables swap
T}	T{
No
T}
_
T{
timezone
T}	T{
\X'tty: link https://wiki.archlinux.org/title/System_time#Time_zone'\fI\%timezone\fP\X'tty: link'
T}	T{
sets a timezone for the installed system
T}	T{
No
T}
.TE
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
If no entries are found in \fBdisk_config\fP, archinstall guided installation will use whatever is mounted currently under \fB/mnt/archinstall\fP without performing any disk operations.
.UNINDENT
.UNINDENT
.SS Options for \fB\-\-creds\fP
.sp
Creds is a separate configuration file to separate normal options from more sensitive data like passwords.
Below is an example of how to set the root password and below that are description of other values that can be set.
.INDENT 0.0
.INDENT 3.5
.sp
.EX
{
    \(dq!root\-password\(dq : \(dqSecretSanta2022\(dq
}
.EE
.UNINDENT
.UNINDENT
.SS \-\-creds options
.TS
box center;
l|l|l|l.
T{
Key
T}	T{
Values
T}	T{
Description
T}	T{
Required
T}
_
T{
!encryption\-password
T}	T{
\fBstr\fP
T}	T{
Password to encrypt disk, not encrypted if password not provided
T}	T{
No
T}
_
T{
!root\-password
T}	T{
\fBstr\fP
T}	T{
The root account password
T}	T{
No
T}
_
T{
!users
T}	T{
.INDENT 0.0
.INDENT 3.5
.sp
.EX
{
    \(dqusername\(dq: \(dq<USERNAME>\(dq,
    \(dq!password\(dq: \(dq<PASSWORD>\(dq,
    \(dqsudo\(dq: false
}
.EE
.UNINDENT
.UNINDENT
T}	T{
List of regular user credentials, see configuration for reference
T}	T{
Maybe
T}
.TE
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
\fB!users\fP is optional only if \fB!root\-password\fP was set. \fB!users\fP will be enforced otherwise and the minimum amount of users with sudo privileges required will be set to 1.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
The key\(aqs start with \fB!\fP because internal log functions will mask any keys starting with explamation from logs and unrestricted configurations.
.UNINDENT
.UNINDENT
.SH KNOWN ISSUES
.sp
Some issues are out of the \X'tty: link https://github.com/archlinux/archinstall/'\fI\%archinstall\fP\X'tty: link' projects scope, and the ones we know of are listed below.
.SS Waiting for time sync \X'tty: link https://github.com/archlinux/archinstall/issues/2144'\fI\%#2144\fP\X'tty: link'
.sp
The usual root cause of this is the network topology.
More specifically \X'tty: link https://github.com/archlinux/archinstall/blob/e6344f93f7e476d05bbcd642f2ed91fdde545870/archinstall/lib/installer.py#L136'\fI\%timedatectl show\fP\X'tty: link' cannot perform a proper time sync against the default servers.
.sp
Restarting \fBsystemd\-timesyncd.service\fP might work but most often you need to configure \fB/etc/systemd/timesyncd.conf\fP to match your network design.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
If you know your time is correct on the machine, you can run \fBarchinstall \-\-skip\-ntp\fP to ignore time sync.
.UNINDENT
.UNINDENT
.SS Missing Nvidia Proprietary Driver \X'tty: link https://github.com/archlinux/archinstall/issues/2002'\fI\%#2002\fP\X'tty: link'
.sp
In some instances, the nvidia driver might not have all the necessary packages installed.
This is due to the kernel selection and/or hardware setups requiring additional packages to work properly.
.sp
A common workaround is to install the package \X'tty: link https://archlinux.org/packages/core/x86_64/linux-headers/'\fI\%linux\-headers\fP\X'tty: link' and \X'tty: link https://archlinux.org/packages/extra/x86_64/nvidia-dkms/'\fI\%nvidia\-dkms\fP\X'tty: link'
.SS ARM, 32bit and other CPU types error out \X'tty: link https://github.com/archlinux/archinstall/issues/1686'\fI\%#1686\fP\X'tty: link', \X'tty: link https://github.com/archlinux/archinstall/issues/2185'\fI\%#2185\fP\X'tty: link'
.sp
This is a bit of a catch\-all known issue.
Officially \X'tty: link https://wiki.archlinux.org/title/Frequently_asked_questions#What_architectures_does_Arch_support?'\fI\%x86_64\fP\X'tty: link' is only supported by Arch Linux.
Hence little effort have been put into supporting other platforms.
.sp
In theory, other architectures should work but small quirks might arise.
.sp
PR\(aqs are welcome but please be respectful of the delays in merging.
Other fixes, issues or features will be prioritized for the above reasons.
.SS Keyring is out of date \X'tty: link https://github.com/archlinux/archinstall/issues/2213'\fI\%#2213\fP\X'tty: link'
.sp
Missing key\-issues tend to be that the \X'tty: link https://archlinux.org/packages/core/any/archlinux-keyring/'\fI\%archlinux\-keyring\fP\X'tty: link' package is out of date, usually as a result of an outdated ISO.
There is an attempt from upstream to fix this issue, and it\(aqs the \X'tty: link https://gitlab.archlinux.org/archlinux/archlinux-keyring/-/blob/7e672dad10652a80d1cc575d75cdb46442cd7f96/wkd_sync/archlinux-keyring-wkd-sync.service.in'\fI\%archlinux\-keyring\-wkd\-sync.service\fP\X'tty: link'
.sp
The service starts almost immediately during boot, and if network is not configured in time — the service will fail.
Subsequently the \fBarchinstall\fP run might operate on a old keyring despite there being an update service for this.
.sp
There is really no way to reliably over time work around this issue in \fBarchinstall\fP\&.
Instead, efforts to the upstream service should be considered the way forward. And/or keys not expiring between a sane amount of ISO\(aqs.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
The issue can happen on new ISO\(aqs too even as little as a few days after release, as some keys might expire right after the keyring is \fI\(dqburnt in\(dq\fP to the ISO.
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Another common issue relating to the network not being configured, is that time might not be set correctly \- resulting in the keyring not being able to update. See \fI\%Waiting for time sync #2144\fP\&.
.UNINDENT
.UNINDENT
.SS AUR packages
.sp
This is also a catch\-all issue.
\X'tty: link https://wiki.archlinux.org/title/Arch_User_Repository#Updating_packages'\fI\%AUR is unsupported\fP\X'tty: link', and until that changes we cannot use AUR packages to solve feature requests in \fBarchinstall\fP\&.
.sp
This means that feature requests like supporting filesystems such as \X'tty: link https://aur.archlinux.org/packages/zfs-linux'\fI\%ZFS\fP\X'tty: link' can not be added, and issues cannot be solved by using AUR packages either.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
But in spirit of giving the community options, \fBarchinstall\fP supports \fI\%Python Plugins\fP, which means you can run \fBarchinstall \-\-plugin <url>\fP and source an AUR plugin.
.sp
\X'tty: link https://github.com/torxed/archinstall-aur'\fI\%torxed/archinstall\-aur\fP\X'tty: link' is a reference implementation for plugins:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
# archinstall \-\-plugin https://archlinux.life/aur\-plugin
.EE
.UNINDENT
.UNINDENT
.sp
\X'tty: link https://github.com/phisch/archinstall-aur'\fI\%phisch/archinstall\-aur\fP\X'tty: link' is another alternative:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
# archinstall \-\-plugin https://raw.githubusercontent.com/phisch/archinstall\-aur/master/archinstall\-aur.py
.EE
.UNINDENT
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
This will allow for unsupported usage of AUR during installation.
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SH REPORT ISSUES & BUGS
.sp
Issues and bugs should be reported over at \X'tty: link https://github.com/archlinux/archinstall/issues'\fI\%https://github.com/archlinux/archinstall/issues\fP\X'tty: link'\&.
.sp
General questions, enhancements and security issues can be reported over there too.
For quick issues or if you need help, head over to the Discord server which has a help channel.
.SS Log files
.sp
When submitting a help ticket, please include the \fB/var/log/archinstall/install.log\fP\&.
It can be found both on the live ISO but also in the installed filesystem if the base packages were strapped in.
.sp
\fBTIP:\fP
.INDENT 0.0
.INDENT 3.5
.nf
An easy way to submit logs is \fBcurl \-F\(aqfile=@/var/log/archinstall/install.log\(aq https://0x0.st\fP\&.
Use caution when submitting other log files, but \fBarchinstall\fP pledges to keep \fBinstall.log\fP safe for posting publicly!
.fi
.sp
.UNINDENT
.UNINDENT
.sp
There are additional log files under \fB/var/log/archinstall/\fP that can be useful:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
\fB/var/log/archinstall/user_configuration.json\fP \- Stores most of the guided answers in the installer
.IP \(bu 2
\fB/var/log/archinstall/user_credentials.json\fP \- Stores any usernames or passwords, can be passed to \fB\-\-creds\fP
.IP \(bu 2
\fB/var/log/archinstall/user_disk_layouts.json\fP \- Stores the chosen disks and their layouts
.IP \(bu 2
\fB/var/log/archinstall/install.log\fP \- A log file over what steps were taken by archinstall
.IP \(bu 2
\fB/var/log/archinstall/cmd_history.txt\fP \- A complete command history, command by command in order
.IP \(bu 2
\fB/var/log/archinstall/cmd_output.txt\fP \- A raw output from all the commands that were executed by archinstall
.UNINDENT
.UNINDENT
.UNINDENT
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
We only try to guarantee that \fB/var/log/archinstall/install.log\fP is free from sensitive information.
Any other log file should be pasted with \fButmost care\fP!
.UNINDENT
.UNINDENT
.SH DISCORD
.sp
There\(aqs a discord channel which is frequented by some \X'tty: link https://github.com/archlinux/archinstall/graphs/contributors'\fI\%contributors\fP\X'tty: link'\&.
.sp
To join the server, head over to \X'tty: link https://discord.gg/aDeMffrxNg'\fI\%https://discord.gg/aDeMffrxNg\fP\X'tty: link' and join in.
There\(aqs not many rules other than common sense and to treat others with respect. The general chat is for off\-topic things as well.
.sp
There\(aqs the \fB@Party Animals\fP role if you want notifications of new releases which is posted in the \fB#Release Party\fP channel.
Another thing is the \fB@Contributors\fP role can be activated by contributors by writing \fB!verify\fP and follow the verification process.
.sp
Hop in, we hope to see you there! : )
.SH PYTHON LIBRARY
.sp
Archinstall ships on \X'tty: link https://pypi.org/'\fI\%PyPi\fP\X'tty: link' as \fI\%archinstall\fP\&.
But the library can be installed manually as well.
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
These steps are not required if you want to use archinstall on the official Arch Linux ISO.
.UNINDENT
.UNINDENT
.SS Installing with pacman
.sp
Archinstall is on the \X'tty: link https://wiki.archlinux.org/index.php/Official_repositories'\fI\%official repositories\fP\X'tty: link'\&.
And it will also install archinstall as a python library.
.sp
To install both the library and the archinstall script:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
pacman \-S archinstall
.EE
.UNINDENT
.UNINDENT
.sp
Alternatively, you can install only the library and not the helper executable using the \fBpython\-archinstall\fP package.
.SS Installing from PyPI
.sp
The basic concept of PyPI applies using \fIpip\fP\&.
.INDENT 0.0
.INDENT 3.5
.sp
.EX
pip install archinstall
.EE
.UNINDENT
.UNINDENT
.SS Install using source code
.sp
You can also install using the source code.
For sake of simplicity we will use \fBgit clone\fP in this example.
.INDENT 0.0
.INDENT 3.5
.sp
.EX
git clone https://github.com/archlinux/archinstall
.EE
.UNINDENT
.UNINDENT
.sp
You can either move the folder into your project and simply do
.INDENT 0.0
.INDENT 3.5
.sp
.EX
import archinstall
.EE
.UNINDENT
.UNINDENT
.sp
Or you can PyPa\(aqs \X'tty: link https://github.com/pypa/build'\fI\%build\fP\X'tty: link' and \X'tty: link https://github.com/pypa/installer'\fI\%installer\fP\X'tty: link' to install it into pythons module path.
.INDENT 0.0
.INDENT 3.5
.sp
.EX
$ cd archinstall
$ python \-m build .
$ python \-m installer dist/*.whl
.EE
.UNINDENT
.UNINDENT
.SH PYTHON MODULE
.sp
Archinstall supports running in \X'tty: link https://docs.python.org/3/library/__main__.html'\fI\%module mode\fP\X'tty: link'\&.
The way the library is invoked in module mode is limited to executing scripts under the \X'tty: link https://github.com/archlinux/archinstall/tree/master/archinstall/scripts'\fI\%scripts\fP\X'tty: link' folder.
.sp
It\(aqs therefore important to place any script or profile you wish to invoke in the examples folder prior to building and installing.
.SS Pre\-requisites
.sp
We\(aqll assume you\(aqve followed the \fI\%Install using source code\fP method.
Before actually installing the library, you will need to place your custom installer\-scripts under \X'tty: link https://github.com/archlinux/archinstall/tree/master/archinstall/scripts'\fI\%scripts\fP\X'tty: link' as a python file.
.sp
More on how you create these in the next section.
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
This is subject to change in the future as this method is currently a bit stiff. The script path will become a parameter. But for now, this is by design.
.UNINDENT
.UNINDENT
.SS Creating a script
.sp
Lets create a \fItest_installer\fP \- installer as an example. This is assuming that the folder \fI\&./archinstall\fP is a git\-clone of the main repo.
We begin by creating \(dq\X'tty: link https://github.com/archlinux/archinstall/tree/master/archinstall/scripts'\fI\%scripts\fP\X'tty: link'\fB/test_installer.py\fP\(dq. The placement here is important later.
.sp
This script can now already be called using \fBpython \-m archinstall test_installer\fP after a successful installation of the library itself.
But the script won\(aqt do much. So we\(aqll do something simple like list all the hard drives as an example.
.sp
To do this, we\(aqll begin by importing \fBarchinstall\fP in our \(dq\X'tty: link https://github.com/archlinux/archinstall/tree/master/archinstall/scripts'\fI\%scripts\fP\X'tty: link'\fB/test_installer.py\fP\(dq and call a function whtin \fBarchinstall\fP\&.
.INDENT 0.0
.INDENT 3.5
.sp
.EX
import archinstall

print(archinstall.disk.device_handler.devices)
.EE
.UNINDENT
.UNINDENT
.sp
Now, go ahead and reference the \fI\%Install using source code\fP installation method.
After running \fBpython \-m archinstall test_installer\fP it should print something that looks like:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
[
    BDevice(
        disk=<parted.disk.Disk object at 0x7fbe17156050>,
        device_info=_DeviceInfo(
            model=\(aqPC801 NVMe SK hynix 512GB\(aq,
            path=PosixPath(\(aq/dev/nvme0n1\(aq),
            type=\(aqnvme\(aq,
            total_size=Size(value=512110190592, unit=<Unit.B: 1>,
            sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
            free_space_regions=[
                <archinstall.lib.disk.device_model.DeviceGeometry object at 0x7fbe166c4250>,
                <archinstall.lib.disk.device_model.DeviceGeometry object at 0x7fbe166c4c50>,
                <archinstall.lib.disk.device_model.DeviceGeometry object at 0x7fbe166c4a10>],
            sector_size=SectorSize(value=512, unit=<Unit.B: 1>),
            read_only=False,
            dirty=False
        ),
        partition_infos=[
            _PartitionInfo(
                partition=<parted.partition.Partition object at 0x7fbe166c4a90>,
                name=\(aqprimary\(aq,
                type=<PartitionType.Primary: \(aqprimary\(aq>,
                fs_type=<FilesystemType.Fat32: \(aqfat32\(aq>,
                path=\(aq/dev/nvme0n1p1\(aq,
                start=Size(value=2048, unit=<Unit.sectors: \(aqsectors\(aq>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
                length=Size(value=535822336, unit=<Unit.B: 1>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
                flags=[
                    <PartitionFlag.BOOT: flag_id=1, alias=None>,
                    <PartitionFlag.ESP: flag_id=18, alias=None>
                ],
                partn=1,
                partuuid=\(aqa26be943\-c193\-41f4\-9930\-9341cf5f6b19\(aq,
                uuid=\(aq6EE9\-2C00\(aq,
                disk=<parted.disk.Disk object at 0x7fbe17156050>,
                mountpoints=[
                    PosixPath(\(aq/boot\(aq)
                ],
                btrfs_subvol_infos=[]
            ),
            _PartitionInfo(...)
        ]
    )
]
.EE
.UNINDENT
.UNINDENT
.sp
That means your script is in the right place, and \fBarchinstall\fP is working as intended.
.sp
\fBNOTE:\fP
.INDENT 0.0
.INDENT 3.5
Most calls, including the one above requires \X'tty: link https://en.wikipedia.org/wiki/Superuser'\fI\%root\fP\X'tty: link' privileges.
.UNINDENT
.UNINDENT
.SH PYTHON PLUGINS
.sp
\fBarchinstall\fP supports plugins via two methods.
.sp
First method is directly via the \fB\-\-plugin\fP parameter when running as a CLI tool. This will load a specific plugin locally or remotely via a path.
.sp
The second method is via Python\(aqs built in \X'tty: link https://packaging.python.org/en/latest/specifications/entry-points/'\fI\%plugin discovery\fP\X'tty: link' using \X'tty: link https://docs.python.org/3/library/importlib.metadata.html#entry-points'\fI\%entry points\fP\X'tty: link' categorized as \fBarchinstall.plugin\fP\&.
.SS \fB\-\-plugin\fP parameter
.sp
The parameter has the benefit of being stored in the \fB\-\-conf\fP state, meaning when re\-running an installation — the plugin will automatically be loaded.
It\(aqs limitation is that it requires an initial path to be known and written and be cumbersome.
.SS Plugin Discovery
.sp
This method allows for multiple plugins to be loaded with the drawback that they have to be installed beforehand on the system running \fBarchinstall\fP\&.
This mainly targets those who build their own ISO\(aqs and package specific setups for their needs.
.SS What\(aqs supported?
.sp
Currently the documentation for this is scarse. Until that is resolved, the best way to find supported features is to search the source code for \X'tty: link https://github.com/search?q=repo%3Aarchlinux%2Farchinstall+%22plugin.on_%22&type=code'\fI\%plugin.on_\fP\X'tty: link' as this will give a clear indication of which calls are made to plugins.
.SS How does it work?
.sp
\fBarchinstall\fP plugins use a discovery\-driven approach where plugins are queried for certain functions.
As an example, if a plugin has the following function:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
def on_pacstrap(*packages):
    ...
.EE
.UNINDENT
.UNINDENT
.sp
The function \fBarchinstall.Pacman().strap([\(dqsome packages\(dq])\fP is hardcoded to iterate plugins and look for \fBon_pacstrap\fP in the plugin.
If the function exists, \fB\&.strap()\fP will call the plugin\(aqs function and replace the initial package list with the result from the plugin.
.sp
The best way to document these calls is currently undecided, as it\(aqs hard to document this behavior dynamically.
.SS Writing your own?
.sp
The simplest way currently is to look at a reference implementation or the community. Two of these are:
.INDENT 0.0
.IP \(bu 2
\X'tty: link https://github.com/torxed/archinstall-aur'\fI\%torxed/archinstall\-aur\fP\X'tty: link'
.IP \(bu 2
\X'tty: link https://github.com/phisch/archinstall-aur'\fI\%phisch/archinstall\-aur\fP\X'tty: link'
.UNINDENT
.sp
And search for \X'tty: link https://github.com/search?q=repo%3Aarchlinux%2Farchinstall+%22plugin.on_%22&type=code'\fI\%plugin.on_\fP\X'tty: link' in the code base to find what \fBarchinstall\fP will look for. PR\(aqs are welcome to widen the support for this.
.SH ARCHINSTALL.INSTALLER
.sp
The installer is the main class for accessing an installation\-instance.
You can look at this class as the installation you have or will perform.
.sp
Anything related to \fBinside\fP the installation, will be found in this class.
.INDENT 0.0
.TP
.B archinstall.Installer(target: Path, disk_config: DiskLayoutConfiguration, disk_encryption: DiskEncryption | None = None, base_packages: list[str] = [], kernels: list[str] | None = None)
.UNINDENT
.SH AUTHOR
Anton Hvornum
.SH COPYRIGHT
2022, Anton Hvornum
.\" Generated by docutils manpage writer.
.
